package com.fw.service.persistence.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.fw.service.persistence.dto.MerchantProfile;

public interface MerchantProfileDAO extends JpaRepository<MerchantProfile, Long>, JpaSpecificationExecutor<MerchantProfile> {

    @Query("select distinct t.merchantId from MerchantProfile t order by t.merchantId")
    public List<Object> selectDistinctMerchantId();

    @Query("select distinct t.companyNameEn from MerchantProfile t order by t.companyNameEn")
    public List<Object> selectDistinctCompanyNameEn();
    
    @Query("select distinct t.companyNameTh from MerchantProfile t order by t.companyNameTh")
    public List<Object> selectDistinctCompanyNameTh();

    @Query("select distinct t.url from MerchantProfile t order by t.url")
    public List<Object> selectDistinctURL();

    @Query("select distinct t.contact1Name from MerchantProfile t order by t.contact1Name")
    public List<Object> selectDistinctContact1Name();
    
    @Query("select distinct t.contact2Name from MerchantProfile t order by t.contact2Name")
    public List<Object> selectDistinctContact2Name();
    
    @Query("select distinct t.contact3Name from MerchantProfile t order by t.contact3Name")
    public List<Object> selectDistinctContact3Name();
    
    @Query("select distinct t.contact4Name from MerchantProfile t order by t.contact4Name")
    public List<Object> selectDistinctContact4Name();

}
